import 'package:flutter/material.dart';
import 'package:flutter_app/components/layout.dart';
import 'package:flutter_app/components/text_field_eye.dart';
import 'package:flutter_app/generated/l10n.dart';

class BottomSheetModal {
  //设置资金密码
  static void setFundPsw(context) {
    GetBottomSheet(context, text: S.of(context).set_fund, height: 280, children: [
      Container(
        padding: EdgeInsets.only(right: 20.0),
        child: Column(
          children: [
            TextFieldEye(
              onChanged: (text) {},
            ),
            Container(
                margin: EdgeInsets.only(top: 15.0),
                alignment: Alignment.centerLeft,
                child: Text('180****7098')),
            TextField(
                decoration: InputDecoration(
                    // 短信验证码
                    hintText: S.of(context).sms,
                    enabledBorder: UnderlineInputBorder(
                        borderSide:
                            BorderSide(color: Color(0xffB6B6B6), width: 0.5)),
                    hintStyle: TextStyle(color: Colors.grey, height: 2.2),
                    suffixIcon: TextButton(
                      //发送
                      child: Text(
                        S.of(context).send,
                        style:
                            TextStyle(fontSize: 15, color: Colors.blueAccent),
                      ),
                    ))),
            Container(
                margin: EdgeInsets.only(top: 20),
                width: MediaQuery.of(context).size.width,
                child: FlatButton(
                    color: Colors.blueAccent,
                    textColor: Colors.white,
                    onPressed: () {},
                    //确认
                    child: Text(S.of(context).confirm)))
          ],
        ),
      ),
    ]);
  }

  //设置邮箱
  static void setMail(context) {
    GetBottomSheet(context,
        // 绑定邮箱
        text: S.of(context).bind_mail,
        padding: EdgeInsets.symmetric(horizontal: 15.0),
        height: 390,
        children: [
          Container(
              margin: EdgeInsets.only(top: 20.0),
              alignment: Alignment.centerLeft,
              //邮箱
              child: Text(S.of(context).mail)),
          TextField(
              decoration: InputDecoration(
            hintText: S.of(context).your_mail,
            enabledBorder: UnderlineInputBorder(
                borderSide: BorderSide(color: Color(0xffB6B6B6), width: 0.5)),
            hintStyle: TextStyle(color: Colors.grey, height: 2.2),
          )),
          TextField(
              decoration: InputDecoration(
                  hintText: S.of(context).mail_code,
                  enabledBorder: UnderlineInputBorder(
                      borderSide:
                          BorderSide(color: Color(0xffB6B6B6), width: 0.5)),
                  hintStyle: TextStyle(color: Colors.grey, height: 2.2),
                  suffixIcon: TextButton(
                    //send 发送
                    child: Text(
                      S.of(context).send,
                      style: TextStyle(fontSize: 15, color: Colors.blueAccent),
                    ),
                  ))),
          Container(
              margin: EdgeInsets.only(top: 15.0),
              alignment: Alignment.centerLeft,
              child: Text('180****7098')),
          TextField(
              decoration: InputDecoration(
                  //短信验证码
                  hintText: S.of(context).sms,
                  enabledBorder: UnderlineInputBorder(
                      borderSide:
                          BorderSide(color: Color(0xffB6B6B6), width: 0.5)),
                  hintStyle: TextStyle(color: Colors.grey, height: 2.2),
                  suffixIcon: TextButton(
                    //send 发送
                    child: Text(
                      S.of(context).send,
                      style: TextStyle(fontSize: 15, color: Colors.blueAccent),
                    ),
                  ))),
          Container(
              margin: EdgeInsets.only(top: 20),
              width: double.infinity,
              //confirm 确认
              child: FlatButton(
                  color: Colors.blueAccent,
                  textColor: Colors.white,
                  onPressed: () {},
                  child: Text(S.of(context).confirm)))
        ]);
  }
}
